Optimized database technique to enable faster data synchronization

ABSTRACT

Method and system that enables faster data synchronization between different databases. In one embodiment, a method for synchronizing data records between databases is provided. Initially, a first database is designated as a source database and a second database as a target database. The modification flag of a first data record in the source database is examined. If the first modification flag is set, the first data record is propagated to the target database. On the other hand, if the first modification flag is not set, a first modification count of the first data record is compared with a second modification count of—a corresponding data record in the target database. In this embodiment, each of the modification counts is a value indicating how many times the respective data record has been modified. If it is determined that the first modification count has a higher value than the second modification count, the corresponding data record is updated according to the first data record. Importantly, the method of this embodiment can be carried out as described without comparing the raw data of the data records. As such, this embodiment of the present invention advantageously eliminates the record-by-record comparison that is inherent in the prior art synchronization process and the inconvenience associated therewith and provides an efficient data synchronization technique that can be beneficially utilized in numerous applications.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of application Ser. No.09/710,605, entitled “OPTIMIZED DATABASE TECHNIQUE EO ENABLE FASTER DATASYNCHRONIZATION,” filed Nov. 20, 2000, to be issued as U.S. Pat. No.7,113,963, assigned to the assignee of the present application. Thesubject matter in the above-identified co-pending and commonly ownedapplications are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to database design. More specifically, thepresent invention pertains to a method and system that enables fasterdata synchronization between different databases.

2. Related Art

Computer systems and other electronic devices have become integral toolsthat are used extensively to perform a wide variety of useful operationsin modern society. Applications of computer systems can be found invirtually all fields and disciplines, including but not limited tobusiness, industry, scientific research, education and entertainment.For instance, computer systems are used to analyze financial data, tocontrol industrial machinery, to model chemical molecules, to deliverclassroom presentations and to generate special effects for movies.Moreover, computer systems along with other electronic devices arefinding new applications as a result of advances in hardware technologyand rapid development in software technology. The growing affordabilityof computer systems and electronic devices together with the abundanceof useful new applications have fueled strong demand for such systemsand devices.

Included within this broad category of computers and electronic devices.is the personal digital assistant (commonly referred to as a PDA).Specifically, as the components required to build a computer system havebeen greatly reduced in size, new categories of computer systems haveemerged. One of these new categories of computer systems is the PDA. APDA is a portable computer system which is small enough to be heldconveniently and comfortably in the hand of its user. In particular, apopular size for the typical PDA approximates the size of a palm.

The PDA is usually a battery-powered device that is typically used as anelectronic organizer having the capability to store and display a widerange of information which can include numerous addresses and telephonenumbers of business and personal acquaintances, financial information,daily appointments, along with various other personal information. Assuch, the PDA is able to consolidate a wide variety of information andmake the information easily accessible by its user. Therefore, PDAs arevery useful and have gained wide popularity.

PDAs usually has a built-in database (e.g., as part of the systemsoftware) for storing the wide variety of information as describedabove. Moreover, PDAs typically have the capability to communicateinformation with another system, such as to a desktop computer systemvia a cradle. In many cases, the desktop computer system also store thesame kind of information as the PDA with which it communicates in itsown database. In between instances of such data communications, theinformation on either the PDA's or the desktop computer system'sdatabase may have been changed (e.g., updates, additions, deletions) bythe user. It is also possible that information in both databases havebeen modified. For example, a user may have added a new entry into theaddress book of the PDA, and that particular addition has not yet beenmade to the desktop system's database. Under such circumstances, whenthe PDA and the desktop system engage in a communication session, datasynchronization between the two databases needs to be performed so thatthe correct information is propagated to both databases.

Currently, some PDAs employ two different modes of synchronization,namely: a slow sync mode and a fast sync mode. According to thisimplementation, a fast sync is applicable only in a limited number ofsituations, such as during the first synchronization after a databasehas been modified. In a subsequent synchronization with a differentdatabase, such as a database on a different desktop system, a fast syncis not appropriate and a slow sync is required.

As their names indicate, a slow sync requires more time to complete thana fast sync. This is because while a fast sync simply works on datarecords that are marked as modified, a slow sync performs arecord-by-record comparison for the entire database. Indeed, a slow synctakes up an incrementally longer time period to complete as the size ofthe database (e.g., measured by the number of data records) that needsto be synchronized increases. As such, it can be an inconvenience tousers, especially those who frequently need to synchronize theirhand-held device with multiple desktop systems, which typically includea home computer and an office computer. As hand-held computer technologyadvances and its applications multiply, an increasing number of usersutilize hand-held computers and PDAs to store information whicheventually needs to be stored in a desktop system, or as a conduit topropagate information between different systems or devices. Therefore,it would be advantageous to come up with a technique that can speed upthe rate of data synchronization in situations where a slow sync wouldhave been required under the existing approach.

Another shortcoming of the two-mode data synchronization approach, wherefast sync is used in some cases and slow sync in others, is that itnecessitates extra programming for developers of applications for PDAs.In particular, since different sync modes are needed under differentscenarios, developers need to incorporate program code in PDAapplications for determining which sync mode to use in a givensituation. Such a requirement is undesirable because the extra programcode could prolong the development cycle and introduce added complexityto the applications. Thus, it would be beneficial to provide an approachfor data synchronization which is efficient in terms of speed and whichdoes not employ multiple modes of synchronization depending on theparticular situation.

SUMMARY OF THE INVENTION

It would be advantageous to provide a method and system for datasynchronization that does not require a long time period to complete.Furthermore, it would also be advantageous for such method and systemnot to introduce extra complexity into development efforts such thatapplication development cycles would not be adversely affected.

Accordingly, the present invention provides a method and system thatenables faster data synchronization between different databases. Moreparticularly, embodiments of the present invention eliminate the need toperform record-by-record comparison of all data records in the databasesbeing synchronized. The lengthy synchronization process inherent in theprior art slow sync approach and the inconvenience associated therewithis thus advantageously eliminated. Moreover, since embodiments of thepresent invention are capable of handling data synchronizationirrespective of whether an earlier synchronization has been performed,the need for a dual-mode (e.g., fast sync and slow sync) synchronizationapproach is beneficially eliminated. As such, the complexity ofapplication development is greatly reduced, thereby simplifying the jobfor application developers. ‘Thus, the present invention provides asuperior approach to data synchronization over the prior art. These andother advantages of the present invention not specifically mentionedabove will become clear within discussions of the present inventionpresented herein.

More specifically, in one embodiment of the present invention, a methodfor synchronizing data records between databases is provided. Initially,a first database is designated as a source database and a seconddatabase as a target database. The modification flag of a first datarecord in the source database is examined. If the first modificationflag is set, the first data record is propagated to the target database.On the other hand, if the first modification flag is not set, a firstmodification count of the first data record is compared with a secondmodification count of a corresponding data record in the targetdatabase. In this embodiment, each of the modification counts is a valueindicating how many times the respective data record has been modified.If it is determined that the first modification count has a higher valuethan the second modification count, the corresponding data record isupdated according to the first data record. Importantly, the method ofthis embodiment can be carried out as described without comparing theraw data of the data records. As such, this embodiment of the presentinvention advantageously eliminates the record-by-record comparison thatis inherent in the prior art synchronization process and theinconvenience associated therewith and provides an efficient datasynchronization technique that can be beneficially utilized in numerousapplications.

In a specific embodiment, the present invention includes the above andwherein the first database and the second database reside in differenthost systems. In a currently preferred embodiment, the first databaseresides in a personal digital assistant (PDA). In one embodiment, thePDA runs on the PalmOS. Furthermore, in another embodiment, the seconddatabase resides in a computer system to which a PDA can be coupled viaa cradle device.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and form a part ofthis specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention:

FIG. 1 is a system illustration of an exemplary personal digitalassistant computer system connected to other computer systems and theInternet via a cradle device.

FIG. 2A a top side perspective view of an exemplary personal digitalassistant computer system.

FIG. 2B is a bottom side perspective view of the personal digitalassistant computer system of FIG. 2A.

FIG. 3 is an exploded view of the components of the exemplary personaldigital assistant computer system of FIG. 2A.

FIG. 4 is a perspective view of the cradle device for connecting thepersonal digital assistant computer system to other systems via acommunication interface.

FIG. 5 is a logical block diagram of circuitry located within theexemplary personal digital assistant computer system of FIG. 2A.

FIG. 6 is a block diagram of a system practicing data synchronization inaccordance with one embodiment of the present invention.

FIG. 7 illustrates an exemplary database layout in accordance with oneembodiment of the present invention.

FIG. 8 is a flow diagram illustrating steps for synchronizing datarecords between different databases in accordance with one embodiment ofthe present invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following detailed description of the present invention, anoptimized database technique that enables efficient datasynchronization, numerous specific details are set forth in order toprovide a thorough understanding of the present invention. However, itwill be recognized by one skilled in the art that the present inventionmay be practiced without these specific details or with equivalentsthereof. In other instances, well known methods, procedures, components,and circuits have not been described in detail as not to unnecessarilyobscure aspects of the present invention.

Notation and Nomenclature

Some portions of the detailed descriptions which follow are presented interms of procedures, steps, logic blocks, processing, and other symbolicrepresentations of operations on data bits within a computer memory.These descriptions and representations are the means used by thoseskilled in the data processing arts to most effectively convey thesubstance of their work to others skilled in the art. A procedure,computer executed step, logic block, process, etc., is here, andgenerally, conceived to be a self-consistent sequence of steps orinstructions leading to a desired result. The steps are those requiringphysical manipulations of physical quantities. Usually, though notnecessarily, these quantities take the form of electrical or magneticsignals capable of being stored, transferred, combined, compared, andotherwise manipulated in a computer system. It has proven convenient attimes, principally for reasons of common usage, to refer to thesesignals as bits, values, elements, symbols, characters, terms, numbers,or the like.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the followingdiscussions, it is appreciated that throughout the present invention,discussions utilizing terms such as “designating”, “examining”,“propagating”, “comparing”, “updating”, “incrementing” or the like,refer to the action and processes of a computer system (e.g., FIG. 5),or similar electronic computing device, that manipulates and transformsdata represented as physical (electronic) quantities within the computersystem's registers and memories into other data similarly represented asphysical quantities within the computer system memories or registers orother such information storage, transmission or display devices.

Aspects of the present invention, described below, are discussed interms of steps executed on a computer system. These steps (e.g., process800) are implemented as program code stored in computer readable memoryunits of a computer system and are executed by the processor of thecomputer system. Although a variety of different computer systems can beused with the present invention, an exemplary personal digital assistantcomputer system is shown in FIG. 5 further below.

An Illustrative Computer System Environment within which Embodiments ofthe Present Invention can be Practiced

Referring now to FIG. 1, a system 50 that can be used in conjunctionwith the present invention is shown. It is appreciated that the methodand system for synchronizing data records between databases of thepresent invention can be used in conjunction with any computers systemand that system 50 is illustrative rather than limiting. It is furtherappreciated that the portable computer system 100 described below isonly exemplary. System 50 comprises a host computer system 56 which caneither be a desktop unit as shown or alternatively, can be a laptopcomputer system 58. Optionally, one or more host computer systems can beused within system 50. Host computer systems 58 and 56 are shownconnected to a communication bus 54, which in one embodiment can be aserial communication bus, but could be of any of a number of well knowndesigns, e.g., a parallel bus, Ethernet, Local Area Network (LAN), etc.Optionally, bus 54 can provide communication with the Internet 52 usinga number of well known protocols.

Importantly, bus 54 is also coupled to a cradle 60 for receiving andinitiating communication with a personal digital assistant computersystem 100. Cradle 60 provides an electrical and mechanicalcommunication interface between bus 54 (and anything coupled to bus 54)and computer system 100 for two way communications. Computer system 100also contains a wireless infrared communication mechanism 64 for sendingand receiving information from other devices. Within the scope of thepresent invention, data records stored in a database residing incomputer system 100 car1 be synchronized, in a highly efficient manner,with data records stored in a different database, such as one residingin desktop computer system 56 or laptop computer system 58. A moredetailed description of the structure of an illustrative implementationof computer system 100 and its operation in conjunction with a methodfor synchronizing data records between databases in accordance with oneembodiment of the present invention is presented further below withreference to FIGS. 6 and 7.

With reference to FIG. 2A, a perspective illustration of the top face100 a of exemplary personal digital assistant computer system 100 isshown. Top face 110 a contains a display screen 105 surrounded by abezel or cover. A removable stylus 80 is also shown. Display screen 105is a touch screen capable of registering contact between the screen andthe tip of stylus 80. Stylus 80 can be fabricated of any material whichcan make contact with screen 105. Top face 100 a also contains one ormore dedicated and/or programmable buttons 75 for selecting informationand causing computer system 100 to implement functions. An on/off button95 is shown as well.

Referring still to FIG. 2A, a handwriting recognition pad or “digitizer”containing regions 106 a and 106 b is also shown. Specifically, region106 a is for the drawing of alpha characters therein for automaticrecognition and region 106 b is for the drawing of numeric characterstherein for automatic recognition. Stylus 80 is used for stroking acharacter within one of the regions 106 a and 106 b. The strokeinformation is then fed to an internal processor for automatic characterrecognition. Once characters are recognized, they are typicallydisplayed on screen 105 for verification and/or modification.

FIG. 2B illustrates the bottom side 100 b of one embodiment of personaldigital assistant computer system 100. An optional extendible antenna 85is shown, and a battery storage compartment door 90 is shown as well. Acommunication interface 108 is also shown. In one embodiment of thepresent invention, the serial communication interface 108 comprises aserial communication port, but it could also alternatively be of any ofa number of well known communication standards and protocols, e.g.,parallel, small computer system interface (SCSI), Ethernet, Firewire(IEEE 1394), etc.

With reference now to FIG. 3, an exploded view of the exemplary personaldigital assistant computer system 100 is shown. System 100 contains afront cover 210 having an outline of region 106 and holes 75 a forreceiving buttons 75 b. A flat panel display 105 (both liquid crystaldisplay and touch screen) fits into front cover 210. Any of a number ofdisplay technologies can be used, e.g., liquid crystal display (LCD),field emission device (FED), plasma, etc., for the flat panel display105. A battery 215 provides electrical power. A contrast adjustment(potentiometer) 220 is also shown. On/off button 95 is shown along withan infrared emitter and detector device 64. A flex circuit 230 is shownalong with a PC board 225 containing electronics and logic (e.g.,memory, communication bus, processor, etc.) for implementing computersystem functionality. The digitizer pad is also included in PC board225. A midframe 235 is shown along with stylus 80. Position adjustableantenna 85 is also shown.

Additionally, a radio receiver/transmitter device 240 is also shownbetween the midframe and the rear cover 245 of FIG. 3. Radioreceiver/transmitter device 240 is coupled to antenna 85 and alsocoupled to communicate with PC board 225. In one implementation, theMobitex wireless communication system is used to provide two waycommunication between system 100 and other networked computers and/orthe Internet via a proxy server.

FIG. 4 is a perspective illustration of one embodiment of the cradle 60for receiving the personal digital assistant computer system 100. Cradle60 contains a mechanical and electrical interface 260 for interfacingwith serial connection 108 (FIG. 2B) of computer system 1 00 when system100 is slid into the cradle 60 in an upright position. Once inserted,button 270 can be pressed to initiate two way communication betweensystem 100 and other computer systems coupled to serial communicationbus 54.

Referring now to FIG. 5, a block diagram of exemplary personal digitalassistant computer system 100 is shown. Some of the modules shown inFIG. 5 can be implemented on PC board 225. Computer system 100 includesan address/data bus 99 for communicating information, a centralprocessor 101 coupled with bus 99 for processing information andinstructions, a volatile memory unit 102 (e.g., random access memory,static RAM, dynamic RAM, etc.) coupled with bus 99 for storinginformation and instructions for central processor 101 and anon-volatile memory unit 103 (e.g., read only memory, programmable ROM,flash memory, EPROM, EEPROM, etc.) coupled with bus 99 for storingstatic information and instructions for processor 101. As describedabove, computer system 100 also contains a display device 105 coupled tobus 99 for displaying information to the computer user. PC board 225 cancontain processor 101, bus 99, volatile memory unit 102, and nonvolatilememory unit 103. As described further below, portions of memory units102 and 103 can be removed from computer system 100. Moreover, computersystem 100 can also include an optional data storage device 104 (e.g.,memory stick) for storing information and instructions. In oneembodiment, optional data storage device 104 is removable from computersystem 100.

In a currently preferred embodiment, one or more database(s) reside in amemory unit of computer system 100, such as memory units 102 and 103. Inan alternative embodiment, such database(s) reside in optional datastorage device 104. In accordance with embodiments of the presentinvention, data records stored in any of these databases can beefficiently synchronized with those stored in another database, whichcan reside in a different computer system, as described further belowwith reference to FIGS. 6 and 7.

Also included in computer system 100 of FIG. 5 is an optionalalphanumeric input device 106 which, in one implementation, is ahandwriting recognition pad (“digitizer”) having regions 106 a and 106 b(FIG. 2A), for instance. Device 106 can communicate information andcommand selections to central processor 101. Computer system 100 alsoincludes an optional cursor control or directing device 107 coupled tobus 99 for communicating user input information and command selectionsto central processor 101. In one implementation, device 107 is a touchscreen device incorporated with screen 105. In this implementation,device 107 is capable of registering a position on screen 105 where astylus makes contact. Display device 105 utilized with computer system100 may be a liquid crystal device (LCD), cathode ray tube (CRT), fieldemission device (FED, also called flat panel CRT) or other displaydevice suitable for creating graphic images and alphanumeric charactersrecognizable to the user. In a currently preferred embodiment, display105 is a flat panel display Computer system 100 also includes signalcommunication interface 108, which-is also coupled to bus 99, and can bea serial port for communicating with cradle 60. Communication interface108 can also include an infrared communication mechanism.

It is appreciated that computer system 100 described herein illustratesan exemplary configuration of an operational platform upon whichembodiments of the present invention can be implemented. Nevertheless,other computer systems with differing configurations can also be used inplace of computer system 100 within the scope of the present invention.

Referring next to FIG. 6, a block diagram is shown of a system 600practicing data synchronization in accordance with one embodiment of thepresent invention. System 600 includes a hand-held computer 100 andanother computer system 140 or an interface communicatively coupledthereto. Example embodiments of the hand-held computer 100 includevarious models of the Palm hand-held organizers, as well as numerousother hand-held computers running a version of the Palm operatingsystem, or PalmOS. Additional embodiments include other hand-heldcomputers, such as those running a version of Microsoft's Windows CEoperating system and those running a version of the EPOC operatingsystem, as well as set-top boxes. Similarly, examples of computer system140 include the same examples mentioned previously for computer 100,along with other hardware modules or interfaces not specificallymentioned herein.

As illustrated in FIG. 6, hand-held computer 100 includes a memory 110(e.g., volatile memory unit 102, non-volatile memory unit 103 of FIG. 5)and processor 101. Memory 101 can store various programs, or sequencesof instructions for execution by processor 101, as well as otherinformation and data. Example programs shown include a database 112 andpersonal information management (PIM) applications 114 and 116, such asan address book, a daily organizer and electronic notepads, to name afew. Other programs 118 can include programs for carrying out otherinternal functions of hand-held computer 100, or for carrying outfunctions relating to interfacing with computer system 140. Some of theprograms may be included in device drivers, the operating system, and/orapplications.

In a currently preferred embodiment, hand-held computer 100 furtherincludes infrared interface 64 and a connector 135, and processor 101includes a communications port 125. In this embodiment, communicationinterface 108 (FIG. 1) of computer 100 comprises infrared interface 64,communications port 125, and connector 135. Hand-held computer 100communicates with computer system 140 via one or more communicationsports 125. In one embodiment, processor 101 is a DragonBall processormanufactured by Motorola, Inc. For example, the Palm lllx and Palm Vhand-held computers use a DragonBall processor model known as theDragonBall EZ MC68EZ238 Integrated Microprocessor. Other embodiments usedifferent microprocessors. An embodiment implemented using theDragonBall EZ processor has a communications port 125 that includes oneserial port, while other embodiments of the present invention caninclude multiple serial ports, one or more parallel port(s), or otherconfigurations.

In accordance with embodiments of the present invention, hand-heldcomputer 100 communicates with computer system/communication interface140 via a wired or wireless connection. An example of a wirelessconnection is a communication link between two hand-held computers 100and 142 carried out in infrared through infrared interface 64 coupled tocommunications port 125. In infrared communication, an infraredtransceiver included in infrared interface 64 of hand-held computer 100communicates with the infrared transceiver of another hand-held computer142. In one embodiment, the transceivers follow an lrDA (Infrared DataAssociation) protocol. In other embodiments, other protocols are used.

An example of a wired connection is a communication link between handheld computer 100 and a keyboard 150 through connector 135. Anotherexample of a wired connection is a communication link between hand-heldcomputer 100 and cradle 60, through connector 135 coupled tocommunications port 125. This is a configuration that is often used tosynchronize data between hand-held computer 100 and another computer 146(e.g., desktop computer 56 or laptop computer 58 of FIG. 1). Inparticular, in a currently preferred embodiment, the datasynchronization method of the present invention is practiced withhand-held computer 100 being coupled to computer 146 via cradle 60,where one of the databases to be synchronized resides in hand-heldcomputer 100 and the other resides in computer 146.

Within the scope of the present invention, in addition to the devicesmentioned above, computer system/communication interface 140 can also bea modem 148, devices for cellular or personal communication services,other wireless devices 152 including radio, infrared, and acousticcommunication peripherals, as well as Bluetooth devices. Information onthe Bluetooth communication specification is not described herein but isavailable on the Internet at the address http://www.bluetooth.com.

Exemplary Database Layout in Accordance with One Embodiment of thePresent Invention

Referring next to FIG. 7, an exemplary database layout in accordancewith one embodiment of the present invention is illustrated in the formof a database table 700. In one embodiment, database table 700 is storedin database 112 which resides in memory 110 of hand-held computer 100 asdescribed with reference to FIG. 6 above. In FIG. 7, four columns areshown in table 700. On the other hand, the number of rows is determinedby the number of data records stored in table 700. As illustrated,column 710 is for storing data record IDS, column 720 for modificationflags, column 730 for modification counts, and column 740 for raw data.Given this table layout, a cell at the intersection of a column and arow stores a particular attribute of a certain data record. For example,cell 711 is for storing the data record ID of a particular data record,while cell 722 is for storing the modification flag of another datarecord. In another embodiment, raw data of a data record is classifiedinto different categories or fields which are then stored in separatecolumns. For instance, in a database for an address book application,the raw data of a data record can include a contact name, one or morephone numbers one or more addresses, and electronic mail addresses,among others. Each piece of information, in this case can logically bestored in a separate column within the scope of the present invention.

It is appreciated that table 700 can include additional columns whichare not shown in FIG. 7. Such additional columns may be necessary forstoring other data or information not specifically described herein andnot required in order to practice the present invention. The number ofsuch additional columns, if any, and their format (e.g., data types) isdependent upon the particular design of the database in question. Thus,although not expressly shown in FIG. 7, such alternative embodiments andvariations are within the scope and spirit of the present invention.

In a currently preferred embodiment, each data record in a database hasa data record ID that uniquely identifies the particular data recordfrom among others in the database. Column 710 as described above is usedto store these data record IDS. In this embodiment, each data recordalso has an associated modification flag, which is stored in column 720.Within the present invention, this flag can take on one of severalpossible value at any given time, which value serves to indicate themodification status of the data record. In one embodiment wherein thedatabase runs on the PalmOS, possible values for the modification flaginclude “new,” “modified,” “deleted” and “archived,” among others. Inthis embodiment, “new’ indicates that since the last datasynchronization has taken place, the data record has been newly createdor added to the database “Modified” simply means that the data' recordhas since been modified or updated. “Deleted” means that the data recordhas been deleted and should no longer be listed as a current record.“Archived indicates that the data record is in archive. The modificationflag is set accordingly upon the occurrence of the respective events. Itis appreciated that such events (e.g., additions, modifications,deletions, archiving) can be performed via manual entry by a user of thecomputer system or programmatically by application programs running onthe computer system.

For example, in one embodiment, when a new data record is being added,its modification flag would be set to “new.” Likewise, when an existingdata record is being updated, its modification flag would be set to“modified.” Thus, the record is marked to indicate that it has beenchanged since the last synchronization. When a synchronization isperformed between this database and another database, the modificationflag for each of the data records is checked. Only those records whoseflags are set to “modified” or “new” are processed in a first pass.Moreover, once a record has thus been processed in this first pass, itsmodification flag is cleared. Thus, in a subsequent synchronization witha different database (e.g., a different desktop system), themodification flag alone can no longer be relied upon as a trueindication as to whether the particular data record needs to beprocessed with respect to this other database.

Thus, in a currently preferred embodiment, each data record furtherincludes an associated modification count, which is stored in column730. Within the present invention, this modification count is a valuethat indicates how many times a data record has been modified. Thus, themodification count is another indicator of the modification status ofthe data record. Importantly, in a currently preferred embodiment, themodification count of a data record is an integer value that getsincremented each and every time that data record is modified. Moreover,unlike the modification flag described above, the modification count fora data record is not reset or otherwise cleared when that data record isbeing processed in a synchronization. Instead, it keeps a running totalof the number of times that the specific data record has been modifiedsince its creation. As such, the modification count of a data record isa modification history log that is used by and yet remains unaffected bythe synchronization process.

Operation of the Data Synchronization Method in Accordance with OneEmbodiment of the Present Invention

Building upon the foregoing description, an example would best serve toillustrate the operation of the present invention. Suppose a user hasupdated an entry in the address book database 112 of hand-held computer100, such as data record 747 of FIG. 7, and that particular update hasnot been made to the database of desktop system 146. When hand-heldcomputer 100 and desktop system 146 are communicatively coupled (e.g.,via cradle 60), data synchronization between the two databases can beperformed so that both databases would contain the most up-to-dateinformation. In a currently preferred embodiment practiced upon a Palmcompatible device (e.g., a device running on the Palm OS), a HotSyncinterrupt can be used to initiate the data synchronization process ofthe present invention.

In accordance with one embodiment of the present invention, whenhand-held computer 100 having modified data record 747 (e.g., theupdated address book entry) and desktop computer system 146 undergo datasynchronization, the modification flags for all data records wouldinitially be examined in a first phase of the synchronization process.At this point, the modification flag for modified record 747 in database112 would read “modified” (cell 742) and as such the raw data (cell 744)of data record 747 would be propagated (e.g., copied over) to thedatabase in desktop system 146. Moreover, the modification flag for datarecord 747 in database 112 would be cleared to indicate that data record747 has been processed in this first phase.

In a currently preferred embodiment, the method of the present inventionfirst checks the modification flags for all data records in the databasein handheld computer 100, and then checks the modification flags for alldata records in the database in desktop computer 146. The method of thisembodiment then makes the necessary updates to those data record thathave been modified, added or deleted based on the status of theirmodification flags. Thus, in this particular example where one recordhas been modified in hand-held computer 100, upon completion of theabove described steps, the corresponding data record in the database indesktop system 146 would have the same up-to-date raw data as itscounterpart in database 112 (data record 747) in hand-held computer 100,which is the data record that has been modified. In other words, the—twodatabases would be properly synchronized after the first phase asdescribed thus far.

Continuing with the above example, when hand-held computer 100 and asecond desktop system (not shown in FIG. 6) undergo synchronizationafterwards, the modification flag for data record 747 in database 112 isno longer marked as “modified” upon examination, assuming that datarecord 747 has not been modified again in the meantime. This is becausethe flag has been cleared during the previous synchronization withsystem 146 that has occurred prior in time. As such, data record 747would not be identified as requiring synchronization in the first phaseof the synchronization process. Thus, in accordance with the presentinvention, the modification count of data record 747 comes into play.

More specifically, in accordance with one embodiment of the presentinvention, when hand-held computer 100 having modified data record 747and a second computer system undergo data synchronization afterhand-held computer 100 has already undergone an earlier synchronizationwith a different system, the modification counts for corresponding datarecords in the two databases being synchronized would be compared in asecond phase of the synchronization process. In one embodiment,hand-held computer 100 keeps track of the identity of the computersystem with which it most recently undergoes synchronization (e.g., byway of an identification number or string). By so doing, this embodimentis able to immediately determine whether handheld computer 100 lastsynchronized with the computer with which it is now undergoingsynchronization. With this information, it can immediately be decidedwhether or not the modification flags of the data records in database112 in hand-held computer 100 are usable (e.g., valid) with respect tothe other computer system in .the synchronization process.

In the current example, the modification count for data record 747 indatabase 112 is “1” (cell 743) while the modification count for thecorresponding data record in the other database is “0.” Thus, based onthe difference in the modification counts for the data records, thepresent embodiment identifies that the records need to be reconciled,despite the fact that the modification flag of data record 747 has beencleared. More particularly, since data record 747 has a highermodification count than its counterpart in the other database, thepresent embodiment recognizes that the raw data of data record 747 hasbeen modified since the last synchronization between the two databases.Therefore, the present embodiment propagates the change (e.g., copiesover) from database 112 in hand-held computer 100 to the database in theother computer system. The modification count for the corresponding datarecord in the other database is also incremented to reflect the value ofthe modification count for data record 747. In a currently preferredembodiment, the modification count comparison is performed for all datarecords in the databases, and the necessary updates are madeaccordingly. Thus, in the current example where one record has beenmodified in hand-held computer 100, upon completion of the abovedescribed steps, the corresponding data record in the other databasewould have the same up-to-date raw data as its counterpart in database112 (data record 747) in hand-held computer 100, and the modificationcount would have been incremented accordingly as well.

Referring next to FIG. 8, a flow diagram 800 illustrating steps forsynchronizing data records between databases in accordance with oneembodiment of the present invention is shown. In step 810, a firstdatabase is designated as a source database and a second database as atarget database.

In one embodiment, the first database and the second database reside indifferent host systems. In a currently preferred embodiment, the firstdatabase resides in a personal digital assistant (PDA). In oneembodiment, the PDA runs on the PalmOS. Furthermore, in anotherembodiment, the second database resides in a computer system to which aPDA can be coupled via a cradle device.

Referring still to FIG. 8, in step 820, the modification flag of a firstdata record in the source database is examined.

With reference still to FIG. 8, in step 825, it is determined whetherthe modification flag of the first data record is set. If thedetermination is affirmative, then in step 830, the first data record ispropagated to the target database.

In one embodiment, propagating the first data record to the targetdatabase includes the following. If the first modification flag is setto indicate that the first data record has been modified in the sourcedatabase and the corresponding data record exists in the targetdatabase, then the corresponding data record is updated according to thefirst data record in the source database and the first modification flagis cleared. If the first modification flag is set to indicate that thefirst data record is new in the source database and no correspondingdata record exists in the target database, then a new data record iscreated in the target database according to the first data record in thesource database and the first modification flag is cleared as well. Ifthe first modification flag is set to indicate that the first datarecord has been deleted from the source database and the correspondingdata record exists and is not already marked as deleted in the targetdatabase, then the corresponding data record is marked as deleted in thetarget database.

Referring still to FIG. 8, if it is determined in step 825 that themodification flag of the first data record is not set, then in step 840,a first modification count of the first data record is compared with asecond modification count of a corresponding data record in the targetdatabase. In a currently preferred embodiment, each of the modificationcounts has a value indicating how many times its corresponding datarecord has been modified.

Referring again to FIG. 8, in step 845, it is determined whether thefirst modification count has a higher value than the second modificationcount. If the first modification count has a higher value, then in step850, the corresponding data record is updated according to the firstdata record. In accordance with the present invention, steps 810 through850 can be completed without comparing the raw data of the first datarecord and the corresponding data record.

With reference again to FIG. 8, in step 860, the second modificationcount is incremented to the higher value of the first modificationcount. As such, the present embodiment maintains a running total of thenumber of times that a specific data record has been modified since itscreation using the modification count, which serves as a modificationhistory log that is used by and yet remains unaffected by thesynchronization process of the present invention. In one embodiment,steps 810 through 860 are repeated until all of the data records in thesource database have been processed. In another embodiment, the sourceand target databases are reversed and steps 810 through 860 are repeateduntil all of the data records in the source database have beenprocessed.

Significantly, in accordance with the present embodiment,record-by-record comparison of all data records in the databases beingsynchronized is not necessary. The lengthy synchronization processinherent in the prior art slow sync and the inconvenience associatedtherewith is thus advantageously eliminated. Moreover, since embodimentsof the present invention are capable of handling data synchronizationunder all scenarios, the need for a dual-mode (e.g., fast sync and slowsync) synchronization approach is beneficially eliminated. As such, thecomplexity of application development is greatly reduced, therebysimplifying the job for application developers. Thus, the presentinvention provides a superior approach to data synchronization over theprior art.

It is appreciated that during the synchronization process of the presentinvention, when the modification flags and/or modification counts ofdata records are examined and compared, various combinations regardingthe status of the modification flags and modification counts could beencountered. The above recited example is one of many possible scenariosand is intended as an illustration rather than a limitation. It would beclear to a person of ordinary skill in the data processing andsynchronization art, having thoroughly read the description of thevarious embodiments of the present invention presented herein, that thedata synchronization technique described and variations thereof areapplicable to such different scenarios.

In addition, certain of these scenarios may call for extra processingstep(s) depending on the specific implementation of the database and/orunderlying operating system. For instance, in an embodiment where theunderlying operating system is the PalmOS, a so-called “double modify”scenario arises when a data record in one database and its counterpartin the other database both have the “modified” status for theirmodification flags. In. such a case, it is a design choice orimplementation decision as to how the data should be reconciled.Irrespective of the specific manner in which such special scenarios arehandled, embodiments described herein, with appropriate adaptations, arecapable of identifying such situations and performing the desiredactions(s) (e.g., creating a log, generating an archive, handing thetask over to another program for exception handling, etc.) withoutdeparting from the scope and spirit of the present invention.

Moreover, although embodiments of the present invention have beendescribed as being practiced upon a hand-held computer such as a PDA, itshould be appreciated that the present invention is not restrictedthereto but rather can be practiced with numerous applications whichrequire data to be synchronized among different databases and/or otherdata storage and archival means. Such alternative applications, thoughnot specifically described in detail herein, are within the scope andspirit of the present invention.

The preferred embodiment of the present invention, a method and systemthat enables faster data synchronization between different databases is.‘thus described while the present invention has been described inparticular embodiments, it should be appreciated that the presentinvention should not be construed as limited by such embodiments, butrather construed according to the below claims.

1. A method for synchronizing data records between databases comprisingthe steps of: a) designating a first database as a source database and asecond database as a target database; b) examining a first modificationflag of a first data record in said source database; c) provided thatsaid first modification flag is set, propagating said first data recordto said target database; d) provided that said first modification flagis not set, comparing a first modification count of said first datarecord with a second modification count of a corresponding data recordin said target database, said first and second modification counts eachbeing a value indicating how many times said first data record and saidcorresponding data record has been modified respectively; and e)provided that said first modification count has a higher value than saidsecond modification count, updating said corresponding data recordaccording to said first data record, wherein said steps a) through e)can be completed without comparing raw data of said first data recordand said corresponding data record.